package algotithm.jianzhioffer.test10_2;

/**
 * @author zhouyanxiang
 * @Date 2020-12-2020/12/14-14:42
 */
public class Solution {

    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.numWays(48));
    }

    public int numWays(int n) {
        int a = 1, b = 1;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum = (a + b) % 1000000007;
            a = b;
            b = sum;
        }
        return a;
    }

    /*public int numWays(int n) {
        if (n == 1 || n == 0) {
            return 1;
        }
        if (n == 2) {
            return 2;
        }
        int[] dp = nextw int[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2;i <=n ; i++) {
            dp[i] = (dp[i-1] + dp[i-2]) % 1000000007;
        }
        return dp[n];
    }*/

}
